package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.dubbo.mappers.CharacterMapper;
import com.tanhua.model.domain.Character;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class CharacterApiImpl implements CharacterApi{

    @Autowired
    private CharacterMapper characterMapper;

    @Override
    public List<Character> findAll() {
        return characterMapper.selectList(new QueryWrapper());
    }

    @Override
    public Character selectById(Long characterId) {
        return characterMapper.selectById(characterId);
    }
}
